<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="framework/bootstrap/css/bootstrap.min.css" />
		<link rel="stylesheet" href="" />
	</head>
	<body>
		<nav class="navbar navbar-default">
			<div class="container-fluid">
				<div class="navbar-header"><a href="" class="navbar-brand">用户姓名</a></div>
				<div>
					<form action="init.do" method="post" class="navbar-form navbar-left">
						<div class="form-group">
							<input type="text" name="conds" placeholder="Search" class="form-control" />
						</div>
						<button class="btn btn-default">搜索</button>
					</form>
					
					<div class="navbar-right navbar-text">
						<span class="glyphicon glyphicon-pencil"></span> <a href="#regDialog" data-toggle='modal'>注册</a>
					</div>
					<div class="navbar-right navbar-text">
						<span class="glyphicon glyphicon-user"></span> <a href="#loginDialog" data-toggle='modal' >登录</a>
					</div>
				</div>
			</div>
		</nav>
		<article class="container">
			<div class="row">
				<div class="col-xs-offset-1 col-xs-10">
					<table class="table table-bordered table-striped table-hover text-center">
						<tr>
							<th class="text-center">用户头像</th>
							<th class="text-center">用户姓名</th>
							<th class="text-center">用户生日</th>
							<th class="text-center">详细信息</th>
							<th class="text-center">信息修改</th>
							<th class="text-center">删除用户</th>
						</tr>
						<c:forEach items="${pb.data }" var="us">
						<tr>
							<td>${us.userphoto }</td>
							<td>${us.username }</td>
							<td>${us.birthday }</td>
							<td><a href="javascript:;" title='标题' data-container='body' data-toggle="popover" data-placement='left' data-content="点我我是内容信息"  id="searchInfo" lang="" class="btn btn-xs btn-info">查看信息</a></td>
							<td><a href="javascript:;" lang="${us.userid }"  class="btn btn-xs btn-primary modify">修改信息</a></td>
							<td><a href="#" class="btn btn-xs btn-danger">删除用户</a></td>
						</tr>
						</c:forEach>
					</table>
				</div>
			</div>
			<div class="row">
				<div class="col-xs-offset-4 col-xs-4">
					<ul class="pagination">
						<li><a href="javascript:;" lang="1" >首页</a></li>
						<li><a href="javascript:;" lang="1" >上页</a></li>
						<li><a href="javascript:;" lang="1" >下页</a></li>
						<li><a href="javascript:;" lang="1" >尾页</a></li>
					</ul>
				</div>
			</div>
		</article>
		<!--登录对话框-->
		<div class="modal fade" id="loginDialog" aria-hidden="true">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button data-dismiss="modal" aria-hidden="true" type="button" class="close">&times;</button>
						<h4 class="modal-title"><span class="glyphicon glyphicon-user"></span> 用户登录</h4>
					</div>
					<div class="modal-body">
						<form action="" role="form" id="frmLogin" class="form-horizontal">
							<div class="form-group">
								<label for="" class="control-label col-xs-3">用户姓名</label>
								<div class="col-xs-8"><input type="text" name="username" class="form-control" /></div>
							</div>
							<div class="form-group">
								<label for="" class="control-label col-xs-3">用户密码</label>
								<div class="col-xs-8"><input type="text" name="password" class="form-control" /></div>
							</div>
						</form>
					</div>
					<div class="modal-footer">
						<button id="btnLogin" type="button" class="btn btn-default">登录</button>
					</div>
				</div>
			</div>
		</div>
		<!--注册对话框-->
		<div class="modal fade" id="regDialog" aria-hidden="true">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
						<h4 class="modal-title">用户注册</h4>
					</div>
					<div class="modal-body">
						<form action="" role="form" id="frmReg" class="form-horizontal" enctype="multipart/form-data">
							<div class="form-group">
								<label for="" class="control-label col-xs-2">用户姓名</label>
								<div class="col-xs-9"><input type="text" name="username" placeholder="请输入" class="form-control" /></div>
							</div>
							<div class="form-group">
								<label for="" class="control-label col-xs-2">用户密码</label>
								<div class="col-xs-9"><input type="password" name="password" placeholder="请输入" class="form-control" /></div>
							</div>
							<div class="form-group">
								<label for="" class="control-label col-xs-2">用户生日</label>
								<div class="col-xs-9"><input type="date" name="birthday" placeholder="请输入" class="form-control" /></div>
							</div>
							<div class="form-group">
								<label for="" class="control-label col-xs-2">用户头像</label>
								<div class="col-xs-9"><input type="file" name="file" placeholder="请输入" class="form-control" /></div>
							</div>
							<div class="form-group">
								<label for="" class="col-xs-2 control-label">权限选择</label>
								<div class="col-xs-10">
									<div class="checkbox"><label for=""><input type="checkbox" name="" value="" />权限1</label></div>
									<div class="checkbox"><label for=""><input type="checkbox" name="" value="" />权限1</label></div>
								</div>
							</div>
						</form>
					</div>
					<div class="modal-footer">
						<div class="col-xs-11"><button id="btnReg" type="button" class="btn btn-default">注册用户</button></div>
					</div>
				</div>
			</div>
			
		</div>
		<!--修改权限对话框-->
		<div class="modal fade" id="modPowDialog" aria-hidden="true">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" data-dismiss="modal" aria-hidden="true" class="close">&times;</button>
						<h4 class="modal-title">修改用户权限</h4>
					</div>
					<div class="modal-body">
						<form action="" id="frmMod" class="form-horizontal">
							<input type="hidden" name="userid" />
							<div class="form-group">
								<lable class="control-label col-xs-2">用户姓名</lable>
								<div class="col-xs-9"><input type="text" name="username" readonly class="form-control" /></div>
							</div>
							<div class="form-group">
								<label for="" class="control-label col-xs-2">用户权限</label>
								<div class="col-xs-9">
									<div class="form-control mypow">
										<c:forEach var="pow" items="${apow }">
											<input type="checkbox" name="pows" value="${pow.powid }"  />${pow.powname }
										</c:forEach>
									</div>
								</div>
							</div>
						</form>
					</div>
					<div class="modal-footer">
						<div class="col-xs-11">
							<button type="button" id="btnMod" class="btn btn-default">修改并保存</button>
						</div>
					</div>
				</div>
			</div>
		</div>
		<script src="framework/jquery/jquery-3.2.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="framework/bootstrap/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/dao/baseDAO.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/services/normal.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/controller/ctrl.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/index.js" type="text/javascript" charset="utf-8"></script>
	</body>
	
</html>
